<?php
namespace app\admin\controller;
use houdunwang\request\Request;
use system\model\Admin;

/**
 * Created by phpstrom.
 * User:wangyahe
 * Date: 2017/6/5
 * Time: 21:06
 */
class Entry extends Common
{
	public function __construct()
	{
		$this->auth();
	}

	public function index(){

		//加载模板文件
		return View::make();
	}

	public function changePassword(Admin $admin){
		//进行post提交
		if(IS_POST){
//			调用admin模型中的函数,所以要先实例化类admin
//			并将获得的post的数据进行传递
			return $admin->changePassword(Request::post());
		}
		return view();
	}
}